﻿using System.Collections;
using System.Collections.Generic;
using PureMVC.Interfaces;
using PureMVC.Patterns;
using UnityEngine;
/// <summary>
/// 启动
/// 打开主面板
/// </summary>
public class StartUpCommand : PureMVC.Patterns.SimpleCommand
{

    public override void Execute(INotification notification)
    {
        MainPanelMediator mainPanelMediator = Facade.RetrieveMediator(MainPanelMediator.NAME) as MainPanelMediator;
        if (mainPanelMediator == null)
        {
            GameObject obj = GameObjectUtility.Instance.CreateGameObject("Prefab/UI/MainPanelView");
            mainPanelMediator = new MainPanelMediator(obj);


            obj.SetActive(true);
        }
        Debug.Log("打开主面板");
        Facade.RegisterMediator(mainPanelMediator);



    }
}